import { ResType, LoadParam } from "./ResDefine";
import ResItem from "./ResItem";


export interface IResLoader {


    init(...data: any[]): void;
    /**
     * 
     * @param url 
     * @param type 
     * @param callback 
     * @param onProgress 
     * @param isSave 使用标记法处理图片时使用
     * @param bundleOrModule 
     */
    loadRes(param:LoadParam): void

    /**
     * 
     * @param url 
     * @param type 
     * @param bundleOrModule 
     */
    releaseRes(url: string, type: ResType, bundleOrModule?: string): void;

    /**
     * 
     */
    release(bundleOrModule?: string): void;

    /**
     * 
     * @param url 
     * @param type 
     * @param bundleOrModule 
     */
    getRes(url: string, type: ResType, bundleOrModule?: string): ResItem;

    /**
     * @param param 
     */
    // loadResByPromise(param: LoadParam): Promise<any>

    // loadArray(list: Array<string>, type: ResType, func: (err: string, process: number) => void, bundleOrModule: string): void;

    releaseUnusedAssets(): void;
}